<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
%>
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />

    <link rel="stylesheet" type="text/css" href="<%=path%>/backstatic/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="<%=path%>/backstatic/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="<%=path%>/backstatic/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="<%=path%>/backstatic/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="<%=path%>/backstatic/h-ui.admin/css/style.css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="<%=path%>/backstatic/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>处理方式</title>
</head>
<body>
<div class="cl pd-20">
    <dl>
        <dt>
            <span data-id="${requestScope.garbage.id}" class="f-18" style="font-weight: 700;color: #A9A9A9;font-size: 25px">${requestScope.garbage.name}处理方式</span>
        </dt>
    </dl>
</div>
<c:forEach items="${requestScope.allSolution}" var="solution" varStatus="stat">
    <div  id="${solution.id}" class="pd-20">
            ${solution.content}<a data-id="${solution.id}"   class="delete" href="script:void(0)" style="float: right">删除</a>
    </div>
</c:forEach>
<script src="<%=path%>/static/js/jquery-3.3.1.min.js"></script>
<script>
    //删除处理方式
    $(function () {
        $(".delete").click(function () {
            var obj=$(this);
            var id=$(this).data("id");
            var garbageId=$(".f-18").data("id");
            $.get("<%=path%>/backstage/garbage/deleteSolution",{id:id,garbageId:garbageId},function () {
               obj.parent().remove();
                // $("id="+id+"").remove();
            });
        });
    })
</script>

</body>
</html>